<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>

<!-- 콘텐츠 영역 -->
<div id="BodyWrap">
       <section>
           <h4 class="pag_title">주문목록</h4>
           <div class="olis_aset">
           	<p class="f_r">
                 <select name="search_select" id="search_select" style="width:96px;">
                   <option value="">전체</option>
                   <option value="3">3개월</option>
                   <option value="6">6개월</option>
                   <option value="1">1년</option>
                 </select>
               </p>
           	<p>전체 총 <span class="ftc_red">${cnt}</span>건</p>
           </div>
           <c:choose>
				<c:when test="${ myOrderList == null }">
           <div class="backgray">
               <div class="sectitle_blkbg sec_blkmalpung">
                   <div class="short_tit">
                       <span>주문내역</span>
                   </div>
               </div>
           </div>
           <div id="ContentWrap4">
           	<center>주문내역이 업습니다</center>
           </div>           
				</c:when>
				<c:otherwise>
           <c:forEach items="${requestScope.myOrderList}" var="items" varStatus="status">
           <div class="backgray">
               <div class="sectitle_blkbg sec_blkmalpung">
                   <div class="short_tit">
                       <span>${items.ORDDT}<em class="mar_r10"></em>주문번호:${items.ORDNO}</span>
                   </div>
                   <div class="gradation_gray1 rightbtn_posi">
                       <a href="/vhmall/orderinfo_detail.vh?ordno=${items.ORDNO}" class="btn_leftarrow" title="상세보기">상세보기</a>
                   </div>
               </div>
           </div>
           <div id="ContentWrap4">
           	<ul class="myp_list2">
               	<li>
                   	<div class="prd_title"><a href="/vhmall/item_detail.vh?prdcd=${items.PRDCD}">${items.PRDNM}</a></div>
                       <div class="ordlist">
                       	<a href="/vhmall/item_detail.vh?prdcd=${items.PRDCD}" class="thumb">
                           	<img src="http://www.vhmall.co.kr/inc/imgLoad.jsp?dirName=product/${items.CORPNO}/&fileName=${items.PRDIMG}&thumb=Y&quality=100&size=230" alt="">
                       	</a>
                           <ol>
                           	<li><em>수량 :</em>${items.ORDQTY}개</li>
                               <li><em>옵션 :</em>
	                           <c:forEach var="opt" items="${requestScope.itemoption}" varStatus="o">
	                           	<c:choose>
	                           	<c:when test="${ opt.SAPCD == items.SAPCD }">${opt.PRDNONM}</c:when>
	                           	</c:choose>
	                           </c:forEach>
                               </li>
                               <li><em>결제상태 :</em>
                               <c:choose>
									<c:when test="${ items.ORDSTATCD == 'OD01' }">${ items.CDNM }</c:when>
									<c:when test="${ items.ORDSTATCD == 'OD02' }">${ items.CDNM }</c:when>
									<c:otherwise>결제완료</c:otherwise>										
							   </c:choose>
                               </li>
                               <li><em>배송상태 :</em>
                               <c:choose>
									<c:when test="${ items.ORDSTATCD == 'OD03' }">
									<span class="ftc_red">배송준비중</span>
									</c:when>
									<c:when test="${ items.ORDSTATCD == 'OD04' }">
										<span class="ftc_blue2">${items.CDNM}</span><a href="#" class="btninli_blk mar_l5" title="배송조회"><span class="btn_ins">배송조회</span></a>
									</c:when>
									<c:when test="${ items.ORDSTATCD == 'OD03' }">배송완료</c:when>
									<c:otherwise>
									</c:otherwise>										
							   </c:choose>
                               </li>
                           </ol>
                       </div>
                   </li>
               </ul>
           </div>
  		</c:forEach>
		</c:otherwise>
		</c:choose>
       </section>

<!--// 콘텐츠 영역 -->